3.13.64 \(\int \frac {(a+b \text {ArcTan}(c x))^2}{d+e x^2} \, dx\) [1264]

Optimal. Leaf size=460 \[ \frac {(a+b \text {ArcTan}(c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \sqrt {e}}-\frac {(a+b \text {ArcTan}(c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \sqrt {e}}-\frac {i b (a+b \text {ArcTan}(c x)) \text {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \sqrt {e}}+\frac {i b (a+b \text {ArcTan}(c x)) \text {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \sqrt {e}}+\frac {b^2 \text {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 \sqrt {-d} \sqrt {e}}-\frac {b^2 \text {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 \sqrt {-d} \sqrt {e}} \]

[Out]

1/2*(a+b*arctan(c*x))^2*ln(2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/(-d)^(1/2)/e^(1/2)-1
/2*(a+b*arctan(c*x))^2*ln(2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/(-d)^(1/2)/e^(1/2)-1/
2*I*b*(a+b*arctan(c*x))*polylog(2,1-2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/(-d)^(1/2)/
e^(1/2)+1/2*I*b*(a+b*arctan(c*x))*polylog(2,1-2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/(
-d)^(1/2)/e^(1/2)+1/4*b^2*polylog(3,1-2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/(-d)^(1/2
)/e^(1/2)-1/4*b^2*polylog(3,1-2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/(-d)^(1/2)/e^(1/2
)

________________________________________________________________________________________

Rubi [A]
time = 0.18, antiderivative size = 460, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {5034, 4968} \begin {gather*} -\frac {i b (a+b \text {ArcTan}(c x)) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \sqrt {e}}+\frac {i b (a+b \text {ArcTan}(c x)) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \sqrt {e}}+\frac {(a+b \text {ArcTan}(c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}-i \sqrt {e}\right )}\right )}{2 \sqrt {-d} \sqrt {e}}-\frac {(a+b \text {ArcTan}(c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}+i \sqrt {e}\right )}\right )}{2 \sqrt {-d} \sqrt {e}}+\frac {b^2 \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 \sqrt {-d} \sqrt {e}}-\frac {b^2 \text {Li}_3\left (1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{4 \sqrt {-d} \sqrt {e}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTan[c*x])^2/(d + e*x^2),x]

[Out]

((a + b*ArcTan[c*x])^2*Log[(2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(2*Sqrt[-d]*S
qrt[e]) - ((a + b*ArcTan[c*x])^2*Log[(2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(2*
Sqrt[-d]*Sqrt[e]) - ((I/2)*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 - (2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*
Sqrt[e])*(1 - I*c*x))])/(Sqrt[-d]*Sqrt[e]) + ((I/2)*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 - (2*c*(Sqrt[-d] + Sqrt
[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(Sqrt[-d]*Sqrt[e]) + (b^2*PolyLog[3, 1 - (2*c*(Sqrt[-d] - Sqr
t[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(4*Sqrt[-d]*Sqrt[e]) - (b^2*PolyLog[3, 1 - (2*c*(Sqrt[-d] +
Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(4*Sqrt[-d]*Sqrt[e])

Rule 4968

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^2/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-(a + b*ArcTan[c*x])^2)*(Log[
2/(1 - I*c*x)]/e), x] + (Simp[(a + b*ArcTan[c*x])^2*(Log[2*c*((d + e*x)/((c*d + I*e)*(1 - I*c*x)))]/e), x] + S
imp[I*b*(a + b*ArcTan[c*x])*(PolyLog[2, 1 - 2/(1 - I*c*x)]/e), x] - Simp[I*b*(a + b*ArcTan[c*x])*(PolyLog[2, 1
 - 2*c*((d + e*x)/((c*d + I*e)*(1 - I*c*x)))]/e), x] - Simp[b^2*(PolyLog[3, 1 - 2/(1 - I*c*x)]/(2*e)), x] + Si
mp[b^2*(PolyLog[3, 1 - 2*c*((d + e*x)/((c*d + I*e)*(1 - I*c*x)))]/(2*e)), x]) /; FreeQ[{a, b, c, d, e}, x] &&
NeQ[c^2*d^2 + e^2, 0]

Rule 5034

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a
+ b*ArcTan[c*x])^p, (d + e*x^2)^q, x], x] /; FreeQ[{a, b, c, d, e}, x] && IntegerQ[q] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{d+e x^2} \, dx &=\int \left (\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2}{2 d \left (\sqrt {-d}-\sqrt {e} x\right )}+\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2}{2 d \left (\sqrt {-d}+\sqrt {e} x\right )}\right ) \, dx\\ &=-\frac {\int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{\sqrt {-d}-\sqrt {e} x} \, dx}{2 \sqrt {-d}}-\frac {\int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{\sqrt {-d}+\sqrt {e} x} \, dx}{2 \sqrt {-d}}\\ &=\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \sqrt {e}}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \sqrt {e}}-\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \sqrt {e}}+\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \sqrt {e}}+\frac {b^2 \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 \sqrt {-d} \sqrt {e}}-\frac {b^2 \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 \sqrt {-d} \sqrt {e}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [F]
time = 180.00, size = 0, normalized size = 0.00 \begin {gather*} \text {\$Aborted} \end {gather*}

Verification is not applicable to the result.

[In]

Integrate[(a + b*ArcTan[c*x])^2/(d + e*x^2),x]

[Out]

$Aborted

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 9.08, size = 5665, normalized size = 12.32

method result size
derivativedivides \(\text {Expression too large to display}\) \(5665\)
default \(\text {Expression too large to display}\) \(5665\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctan(c*x))^2/(e*x^2+d),x,method=_RETURNVERBOSE)

[Out]

result too large to display

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="maxima")

[Out]

a^2*arctan(x*e^(1/2)/sqrt(d))*e^(-1/2)/sqrt(d) + integrate(1/16*(12*b^2*arctan(c*x)^2 + b^2*log(c^2*x^2 + 1)^2
 + 32*a*b*arctan(c*x))/(x^2*e + d), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="fricas")

[Out]

integral((b^2*arctan(c*x)^2 + 2*a*b*arctan(c*x) + a^2)/(x^2*e + d), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \operatorname {atan}{\left (c x \right )}\right )^{2}}{d + e x^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atan(c*x))**2/(e*x**2+d),x)

[Out]

Integral((a + b*atan(c*x))**2/(d + e*x**2), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2}{e\,x^2+d} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atan(c*x))^2/(d + e*x^2),x)

[Out]

int((a + b*atan(c*x))^2/(d + e*x^2), x)

________________________________________________________________________________________